<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	
	    <title><?= Kohana::config('site.name') ?><?= $title ?></title>
	    <link rel="stylesheet" href="<?= url::base() ?>public/styles/default.css" type="text/css" />
	    <link rel="shortcut icon" href="<?= url::base() ?>favicon.ico" />
	</head>
	
	<body>
		<div id="container">
			<div id="header">
				<h1><a href="<?= url::site() ?>"><?= Kohana::config('site.name')?></a></h1>
	
				<h2><?= Kohana::config('site.description')?></h2>
	
	         <div class="clear"></div>
	      </div>
	
			<div id="nav">
				<ul>
					<? foreach($menu as $url=>$name): ?>
						<li><a href="<?= url::site($url) ?>"><?= $name ?></a></li>
					<? endforeach; ?>			
				</ul>
			</div>
			
			<div id="body">
				<div id="content">
					<?= $content ?>
				</div>
			
				<div class="sidebar">
					<ul>
						<li>
							<h4><span>Logowanie</span></h4>
							
							<form id="login_panel" action="" method="post">
								<dl>
									<dt>Login:</dt>
									<dd><input type="text" name="username" value="" class="username" /></dd>

									<dt>Hasło:</dt>
									<dd><input type="password" name="password" value="" class="password"/> <input type="submit" class="formbutton" value="OK" /></dd>
								
									<dd class="remember"><label><input type="checkbox" name="remember" value="1" /> Zapamiętaj mnie</label></dd>
								</dl>
                                <dl>
                                    <dd><a href="<?= url::site('user/register') ?>">Zarejestruj mnie</a></dd>
                                </dl>
							</form>
                            
                            
						</li>
					
						
				
						<li>
							<h4>Szukaj</h4>
				
							<ul>
							    <li>
							        <form method="get" class="searchform" action="">
							            <p><input type="text" size="22" value="" name="q" class="s" /> <input type="submit" class="searchsubmit formbutton" value="Search" /></p>
							        </form>
							    </li>
							</ul>
						</li>
					</ul>
				</div>
				
				<div class="clear"></div>
			</div>
		</div>
			
		<div id="footer">
			<div class="footer-content footer-width">
				<span class="sitename"><?= Kohana::config('site.name')?></span>
			
				<p class="footer-links">
					<? foreach($menu as $url=>$name): ?>
						<a href="<?= url::site($url) ?>"><?= $name ?></a>
						<? if($name != end($menu)): ?> | <? endif; ?>
					<? endforeach; ?>
				</p>
			</div>
			
			<div class="footer-width footer-bottom">
				<p>&copy; <?= Kohana::config('site.name')?> <?= date('Y') ?>.</p>
			</div>
		</div>
        
        <?= View::factory('profiler/stats') ?>
	</body>
</html>